package com.kongshidian.bean;

/**
 * @author fbl
 *  优惠券
 */
public class CouponCode {
	/** code id*/
	private long id;
	private long createDate;
	private long modifyDate;
	/** 号码 */
	private String couponCode;
	/** 优惠劵 */
	private Coupon coupon;
	/** 状态 */
	private String status;
	/** 是否使用 */
	private boolean isUsed;


	@Override
	public String toString() {
		return "CouponCode [id=" + id + ", createDate=" + createDate
				+ ", modifyDate=" + modifyDate + ", couponCode=" + couponCode
				+ ", coupon=" + coupon + ", status=" + status + ", isUsed="
				+ isUsed + "]";
	}
	public CouponCode() {
		super();
	}
	public CouponCode(long id, long createDate, long modifyDate,
			String couponCode, Coupon coupon, String status, boolean isUsed) {
		super();
		this.id = id;
		this.createDate = createDate;
		this.modifyDate = modifyDate;
		this.couponCode = couponCode;
		this.coupon = coupon;
		this.status = status;
		this.isUsed = isUsed;
	}
	public long getId() {
		return id;
	}
	public void setId(long id) {
		this.id = id;
	}
	public long getCreateDate() {
		return createDate;
	}
	public void setCreateDate(long createDate) {
		this.createDate = createDate;
	}
	public long getModifyDate() {
		return modifyDate;
	}
	public void setModifyDate(long modifyDate) {
		this.modifyDate = modifyDate;
	}
	public String getCouponCode() {
		return couponCode;
	}
	public void setCouponCode(String couponCode) {
		this.couponCode = couponCode;
	}
	public Coupon getCoupon() {
		return coupon;
	}
	public void setCoupon(Coupon coupon) {
		this.coupon = coupon;
	}
	public String getStatus() {
		return status;
	}
	public void setStatus(String status) {
		this.status = status;
	}
	public boolean isUsed() {
		return isUsed;
	}
	public void setUsed(boolean isUsed) {
		this.isUsed = isUsed;
	}
	
	
	public static class Coupon {
		/** 优惠劵类型id*/
		private long id;
		private long createDate;
		private long modifyDate;
		/** 优惠劵类型 */
		private CouponType couponType;
		/** 适用类型 */
		private String suitType;
		/** 优惠劵名称 */
		private String name;
		/** 优惠额度 */
		private float preferentialAmount;
		/** 优惠劵开始时间 */
		private long beginDate;
		/** 优惠劵结束时间 */
		private long endDate;
		public long getId() {
			return id;
		}
		public void setId(long id) {
			this.id = id;
		}
		public long getCreateDate() {
			return createDate;
		}
		public void setCreateDate(long createDate) {
			this.createDate = createDate;
		}
		public long getModifyDate() {
			return modifyDate;
		}
		public void setModifyDate(long modifyDate) {
			this.modifyDate = modifyDate;
		}
		public CouponType getCouponType() {
			return couponType;
		}
		public void setCouponType(CouponType couponType) {
			this.couponType = couponType;
		}
		public String getSuitType() {
			return suitType;
		}
		public void setSuitType(String suitType) {
			this.suitType = suitType;
		}
		public String getName() {
			return name;
		}
		public void setName(String name) {
			this.name = name;
		}
		public float getPreferentialAmount() {
			return preferentialAmount;
		}
		public void setPreferentialAmount(float preferentialAmount) {
			this.preferentialAmount = preferentialAmount;
		}
		public long getBeginDate() {
			return beginDate;
		}
		public void setBeginDate(long beginDate) {
			this.beginDate = beginDate;
		}
		public long getEndDate() {
			return endDate;
		}
		public void setEndDate(long endDate) {
			this.endDate = endDate;
		}
		public Coupon(long id, long createDate, long modifyDate,
				CouponType couponType, String suitType, String name,
				float preferentialAmount, long beginDate, long endDate) {
			super();
			this.id = id;
			this.createDate = createDate;
			this.modifyDate = modifyDate;
			this.couponType = couponType;
			this.suitType = suitType;
			this.name = name;
			this.preferentialAmount = preferentialAmount;
			this.beginDate = beginDate;
			this.endDate = endDate;
		}
		public Coupon() {
			super();
		}
		@Override
		public String toString() {
			return "Coupon [id=" + id + ", createDate=" + createDate
					+ ", modifyDate=" + modifyDate + ", couponType="
					+ couponType + ", suitType=" + suitType + ", name=" + name
					+ ", preferentialAmount=" + preferentialAmount
					+ ", beginDate=" + beginDate + ", endDate=" + endDate + "]";
		}


	}


	/** 优惠卷类型 */
	public enum CouponType {

		/** 满减优惠券 */
		fullreduction,

		/** 满送优惠券 */
		fullgive,

		/** 礼品券 */
		gift,

		/** 现金券 */
		cash
	}



}
